{% extends "base.html" %}
{% load i18n %}
{% block content %}
    {{ block.super }}
    <h3>{% blocktrans %}Delete All alerts {{ product }}{% endblocktrans %}</h3>
    <p>{% trans "Delete all alerts will remove all alerts from this instance" %}</p>
    <div class="danger-zone panel panel-danger">
        <div class="panel-heading">
            <h3>{% trans "Danger Zone" %}</h3>
        </div>
        {% if delete_preview%}
            <div>
                <h4>{% trans "The following alerts will be deleted" %}</h4>
            </div>
            {% for alert in alerts %}
                <tr>
                    <td>{% if alert.url %}<a href="{{ alert.url }}">{% endif %}{{ alert.title|linebreaks }}{% if alert.url %}</a>{% endif %}</td>
                </tr>
            {% endfor %}
        {% else %}
            <div>
                <h4>{% trans "Previewing the relationships has been disabled." %}</h4>
            </div>
        {% endif %}
        <form class="form-horizontal" method="post">
            {% csrf_token %}
            {{ form }}

            <div class="form-group">
                <button class="btn btn-danger" type="submit" name="delete_name" value="delete_test">{% trans "Delete Alert" %}</button>
            </div>
        </form>
    </div>
    <br/>
    <br/>
{% endblock %}
